﻿using System.Collections.Generic;
using NExt.Core.Model.Base;

namespace NExt.form
{
    public class HtmlEditor : HtmlEditor<HtmlEditorEvents>
    {
    }

    public abstract class HtmlEditor<TEvents>: Field<TEvents>
        where TEvents : HtmlEditorEvents, new()
    {
        public HtmlEditor()
        {
            fontFamilies = new List<string>();
        }

        public string createLinkText { get; set; }
        public string defaultLinkValue { get; set; }
        public bool? enableAlignments { get; set; }
        public bool? enableColors { get; set; }
        public bool? enableFont { get; set; }
        public bool? enableFontSize { get; set; }
        public bool? enableFormat { get; set; }
        public bool? enableLinks { get; set; }
        public bool? enableLists { get; set; }
        public bool? enableSourceEdit { get; set; }
        public IList<string> fontFamilies { get; set; }
    }

    public class HtmlEditorEvents: FieldEvents
    {
        public IScript activate { get; set; }
        public IScript beforepush { get; set; }
        public IScript beforesync { get; set; }
        public IScript editmodechange { get; set; }
        public IScript initialize { get; set; }
        public IScript push { get; set; }
        public IScript sync { get; set; }
    }
}
